<?php
	/** echo $this->HTML->css('loginV2'); */
	/** echo $this->HTML->css('bootstrap'); */
	echo $this->HTML->css('usersIndex');
?>

<div class="roles index">
	<h2><?php echo __('Roles'); ?></h2>
    <input type="button" value="Add New Role" onClick="javascript:location.href = './roles/add';" />
	<table cellpadding="0" cellspacing="0">
	<tr>
			<th><?php echo $this->Paginator->sort('id'); ?></th>
			<th><?php echo $this->Paginator->sort('type'); ?></th>
			<th class="actions"><?php echo __('Actions'); ?></th>
	</tr>
	<?php foreach ($roles as $role): ?>
	<tr>
		<td><?php echo h($role['Role']['id']); ?>&nbsp;</td>
		<td><?php echo h($role['Role']['type']); ?>&nbsp;</td>
		<td class="actions">
            <?php echo $this->Html->image('viewIcon.png', array("alt" => "View", "title" => "View Role", 'url' => array ('controller' => 'Roles', 'action' => 'view', $role['Role']['id']))); ?>
			<?php echo $this->Html->image('editIcon.png', array("alt" => "Edit", "title" => "Edit Role", 'url' => array ('controller' => 'Roles', 'action' => 'edit', $role['Role']['id']))); ?>
            <?php echo $this->Form->postLink($this->Html->image('deleteIcon.png', array('alt' => __('Delete'), 'title' => __('Delete Role'))), array('controller' => 'Roles', 'action' => 'delete', $role['Role']['id']), array('escape' => false), __('Are you sure want to delete #%s?', $role['Role']['id'])
); ?>
		</td>
	</tr>
<?php endforeach; ?>
	</table>
	<p>
	<?php
	echo $this->Paginator->counter(array(
	'format' => __('Page {:page} of {:pages}, showing {:current} records out of {:count} total, starting on record {:start}, ending on {:end}')
	));
	?>	</p>
	<div class="paging">
	<?php
		echo $this->Paginator->prev('< ' . __('previous'), array(), null, array('class' => 'prev disabled'));
		echo $this->Paginator->numbers(array('separator' => ''));
		echo $this->Paginator->next(__('next') . ' >', array(), null, array('class' => 'next disabled'));
	?>
	</div>
</div>
<!-- <div class="actions">
	<h3><?php /** echo __('Actions'); ?></h3>
	<ul>
		<li><?php echo $this->Html->link(__('New Role'), array('action' => 'add')); ?></li>
		<li><?php echo $this->Html->link(__('List Users'), array('controller' => 'users', 'action' => 'index')); **/?></li>
	</ul>
</div> -->
